package com.qwz.example;

import com.qwz.example.product.ExportBodyModel;
import com.qwz.example.product.ExportFooterModel;
import com.qwz.example.product.ExportHeaderModel;
/**
* @Description: txt版本生成
* @Package com.qwz.example.TxtBuilder
* @author Qiuwuzhi
* @date 2019/12/16 16:04
* @version V1.0
*/
public class TxtBuilder implements Builder {

    StringBuilder builder = new StringBuilder(12);

    public void buildHeader(ExportHeaderModel headerModel) {
        builder.append(headerModel.getHeader());
    }
    public void buildBody(ExportBodyModel bodyModel) {
        builder.append(bodyModel.getBody());
    }
    public void buildFooter(ExportFooterModel footerModel) {
        builder.append(footerModel.getFoot());
    }
    public String getResult(){
        return builder.toString();
    }
}
